package com.AJava1710D.bingfabao.countdoen;

import java.util.concurrent.CountDownLatch;

/**
 * 作者: LCG
 * 日期: 2020/6/23 11:24
 * 描述:
 */
public class TestRun1 implements Runnable {

    private CountDownLatch countDownLatch;

    public TestRun1(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }

    @Override
    public void run() {

        try {
            Thread.sleep(1000);
            System.out.println(Thread.currentThread().getName()+"===同学说：明白了");
            countDownLatch.countDown();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
